<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Pepr3D: D:/Home/MFF/1-Mgr/projekt/pepr3d/src/tools/Brush.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="pepr3d_icon.svg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Pepr3D
   &#160;<span id="projectnumber">v1.0</span>
   </div>
   <div id="projectbrief">Pepr3D is a 3D graphics editor designed for FDM printing</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_brush_8h_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Brush.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &lt;cinder/Ray.h&gt;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;tools/Tool.h&quot;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;ui/IconsMaterialDesign.h&quot;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &quot;ui/SidePane.h&quot;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacepepr3d.html">pepr3d</a> {</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="structpepr3d_1_1_brush_settings.html">   10</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structpepr3d_1_1_brush_settings.html">BrushSettings</a> {</div><div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="structpepr3d_1_1_brush_settings.html#a926d73e6b64dda9d777ba090074bd031">   12</a></span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="structpepr3d_1_1_brush_settings.html#a926d73e6b64dda9d777ba090074bd031">color</a> = 0;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="structpepr3d_1_1_brush_settings.html#a01300f710ecd757b8f532a1da1f3bc4c">   15</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="structpepr3d_1_1_brush_settings.html#a01300f710ecd757b8f532a1da1f3bc4c">size</a> = 0.2f;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="structpepr3d_1_1_brush_settings.html#a297b93063de058754d95730263c48a59">   18</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="structpepr3d_1_1_brush_settings.html#a297b93063de058754d95730263c48a59">segments</a> = 12;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div><div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="structpepr3d_1_1_brush_settings.html#ab509aa6a59f8a36b9de2ae9d579a47f7">   21</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="structpepr3d_1_1_brush_settings.html#ab509aa6a59f8a36b9de2ae9d579a47f7">paintBackfaces</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="structpepr3d_1_1_brush_settings.html#a6988634902d2ebb5e10e4ed2ed9e74dc">   24</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="structpepr3d_1_1_brush_settings.html#a6988634902d2ebb5e10e4ed2ed9e74dc">spherical</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    <span class="comment">// -- Spherical brush setting</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="structpepr3d_1_1_brush_settings.html#a45ac5bb04d5a502b31811ecd94d6fe2b">   29</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="structpepr3d_1_1_brush_settings.html#a45ac5bb04d5a502b31811ecd94d6fe2b">continuous</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="structpepr3d_1_1_brush_settings.html#adddaabb9e5cd0271e781423eb77765db">   32</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="structpepr3d_1_1_brush_settings.html#adddaabb9e5cd0271e781423eb77765db">respectOriginalTriangles</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="structpepr3d_1_1_brush_settings.html#abe64fa6555c4a22a17cdf58779b0288e">   35</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="structpepr3d_1_1_brush_settings.html#abe64fa6555c4a22a17cdf58779b0288e">paintOuterRing</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <span class="comment">// -- Shape brush setting</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="structpepr3d_1_1_brush_settings.html#a4949a6501a1ac9525c0b8ef4219bfdec">   40</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="structpepr3d_1_1_brush_settings.html#a4949a6501a1ac9525c0b8ef4219bfdec">alignToNormal</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> <a class="code" href="structpepr3d_1_1_brush_settings.html">BrushSettings</a>&amp; other)<span class="keyword"> const </span>{</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="structpepr3d_1_1_brush_settings.html#a926d73e6b64dda9d777ba090074bd031">color</a> == other.<a class="code" href="structpepr3d_1_1_brush_settings.html#a926d73e6b64dda9d777ba090074bd031">color</a> &amp;&amp; <a class="code" href="structpepr3d_1_1_brush_settings.html#a01300f710ecd757b8f532a1da1f3bc4c">size</a> == other.<a class="code" href="structpepr3d_1_1_brush_settings.html#a01300f710ecd757b8f532a1da1f3bc4c">size</a> &amp;&amp; <a class="code" href="structpepr3d_1_1_brush_settings.html#a297b93063de058754d95730263c48a59">segments</a> == other.<a class="code" href="structpepr3d_1_1_brush_settings.html#a297b93063de058754d95730263c48a59">segments</a> &amp;&amp;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;               <a class="code" href="structpepr3d_1_1_brush_settings.html#ab509aa6a59f8a36b9de2ae9d579a47f7">paintBackfaces</a> == other.<a class="code" href="structpepr3d_1_1_brush_settings.html#ab509aa6a59f8a36b9de2ae9d579a47f7">paintBackfaces</a> &amp;&amp; <a class="code" href="structpepr3d_1_1_brush_settings.html#a6988634902d2ebb5e10e4ed2ed9e74dc">spherical</a> == other.<a class="code" href="structpepr3d_1_1_brush_settings.html#a6988634902d2ebb5e10e4ed2ed9e74dc">spherical</a> &amp;&amp;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;               <a class="code" href="structpepr3d_1_1_brush_settings.html#a45ac5bb04d5a502b31811ecd94d6fe2b">continuous</a> == other.<a class="code" href="structpepr3d_1_1_brush_settings.html#a45ac5bb04d5a502b31811ecd94d6fe2b">continuous</a> &amp;&amp; <a class="code" href="structpepr3d_1_1_brush_settings.html#adddaabb9e5cd0271e781423eb77765db">respectOriginalTriangles</a> == other.<a class="code" href="structpepr3d_1_1_brush_settings.html#adddaabb9e5cd0271e781423eb77765db">respectOriginalTriangles</a> &amp;&amp;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;               <a class="code" href="structpepr3d_1_1_brush_settings.html#abe64fa6555c4a22a17cdf58779b0288e">paintOuterRing</a> == other.<a class="code" href="structpepr3d_1_1_brush_settings.html#abe64fa6555c4a22a17cdf58779b0288e">paintOuterRing</a> &amp;&amp; <a class="code" href="structpepr3d_1_1_brush_settings.html#a4949a6501a1ac9525c0b8ef4219bfdec">alignToNormal</a> == other.<a class="code" href="structpepr3d_1_1_brush_settings.html#a4949a6501a1ac9525c0b8ef4219bfdec">alignToNormal</a>;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    }</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;};</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_brush.html">   51</a></span>&#160;<span class="keyword">class </span><a class="code" href="classpepr3d_1_1_brush.html">Brush</a> : <span class="keyword">public</span> <a class="code" href="classpepr3d_1_1_tool.html">Tool</a> {</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;   <span class="keyword">public</span>:</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <span class="keyword">explicit</span> <a class="code" href="classpepr3d_1_1_brush.html">Brush</a>(<a class="code" href="classpepr3d_1_1_main_application.html">MainApplication</a>&amp; app) : mApplication(app) {}</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_brush.html#a8a5bfb009a6c666bf0cfdd6afe55812a">   55</a></span>&#160;    <span class="keyword">virtual</span> std::string <a class="code" href="classpepr3d_1_1_brush.html#a8a5bfb009a6c666bf0cfdd6afe55812a">getName</a>()<span class="keyword"> const override </span>{</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        <span class="keywordflow">return</span> <span class="stringliteral">&quot;Brush&quot;</span>;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    }</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_brush.html#aabba5037acc73348535a471b1e8a4979">   59</a></span>&#160;    <span class="keyword">virtual</span> std::optional&lt;Hotkey&gt; <a class="code" href="classpepr3d_1_1_brush.html#aabba5037acc73348535a471b1e8a4979">getHotkey</a>(<span class="keyword">const</span> <a class="code" href="classpepr3d_1_1_hotkeys.html">Hotkeys</a>&amp; hotkeys)<span class="keyword"> const override </span>{</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        <span class="keywordflow">return</span> hotkeys.<a class="code" href="classpepr3d_1_1_hotkeys.html#af57c6eb43b445e2f94f5777c216186d7">findHotkey</a>(HotkeyAction::SelectBrush);</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    }</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_brush.html#a19ed1135e2c4cc603f001c6af4b2f58f">   63</a></span>&#160;    <span class="keyword">virtual</span> std::string <a class="code" href="classpepr3d_1_1_brush.html#a19ed1135e2c4cc603f001c6af4b2f58f">getIcon</a>()<span class="keyword"> const override </span>{</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        <span class="keywordflow">return</span> ICON_MD_BRUSH;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    }</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classpepr3d_1_1_brush.html#a158f2295d13bb0a11f28b88f24dd4cfd">isEnabled</a>() <span class="keyword">const override</span>;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_brush.html#a0f0e98b2326e88fa5b6a3cbeaeb9b3b1">drawToSidePane</a>(<a class="code" href="classpepr3d_1_1_side_pane.html">SidePane</a>&amp; sidePane) <span class="keyword">override</span>;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_brush.html#a88cb183b963bd9e4e5082fcbe50bdcd1">drawToModelView</a>(<a class="code" href="classpepr3d_1_1_model_view.html">ModelView</a>&amp; modelView) <span class="keyword">override</span>;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_brush.html#a9222fa4ba78b38f7b37767dfe8d26b67">onModelViewMouseDown</a>(<a class="code" href="classpepr3d_1_1_model_view.html">ModelView</a>&amp; modelView, ci::app::MouseEvent event) <span class="keyword">override</span>;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_brush.html#acf9efe6c3b3b8bed2ed8b06c68f5f0f9">onModelViewMouseUp</a>(<a class="code" href="classpepr3d_1_1_model_view.html">ModelView</a>&amp; modelView, ci::app::MouseEvent event) <span class="keyword">override</span>;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_brush.html#abfe0a46814dcd751d3801a8dfacd07cb">onModelViewMouseDrag</a>(<a class="code" href="classpepr3d_1_1_model_view.html">ModelView</a>&amp; modelView, ci::app::MouseEvent event) <span class="keyword">override</span>;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_brush.html#a5708ed96781b524410ac440ead73507f">onModelViewMouseMove</a>(<a class="code" href="classpepr3d_1_1_model_view.html">ModelView</a>&amp; modelView, ci::app::MouseEvent event) <span class="keyword">override</span>;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_brush.html#ae73bad242cb367db774983ba3bd9022f">onToolSelect</a>(<a class="code" href="classpepr3d_1_1_model_view.html">ModelView</a>&amp; modelView) <span class="keyword">override</span>;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_brush.html#a6c6e2fb6715017a34ac7269b871cbf6d">onToolDeselect</a>(<a class="code" href="classpepr3d_1_1_model_view.html">ModelView</a>&amp; modelView) <span class="keyword">override</span>;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_brush.html#a73a878df80b0e06bccd02015e170f770">onNewGeometryLoaded</a>(<a class="code" href="classpepr3d_1_1_model_view.html">ModelView</a>&amp; modelView);</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;   <span class="keyword">private</span>:</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_brush.html#af5e005149a8d975bcdeebc3432388572">paint</a>();</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_brush.html#af329ad67cb6de39d79e50b6ad61d5de6">stopPaint</a>();</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <span class="keywordtype">void</span> updateHighlight(<a class="code" href="classpepr3d_1_1_model_view.html">ModelView</a>&amp; modelView, ci::app::MouseEvent event) <span class="keyword">const</span>;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_brush.html#acf2324919135ff372d21bd85e686da8c">updateRay</a>(<a class="code" href="classpepr3d_1_1_model_view.html">ModelView</a>&amp; modelView, ci::app::MouseEvent event);</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    ci::Ray mLastRay;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    glm::vec3 mLastIntersection;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <a class="code" href="classpepr3d_1_1_main_application.html">MainApplication</a>&amp; mApplication;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <a class="code" href="structpepr3d_1_1_brush_settings.html">BrushSettings</a> mBrushSettings;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <span class="keywordtype">float</span> mMaxSize = 1.f;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> SIZE_SLIDER_STEPS = 100;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <span class="keywordtype">bool</span> mGroupCommands = <span class="keyword">false</span>;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_brush.html#a3b228cb4c9e5e7bf60904ab74e2fc6df">  105</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classpepr3d_1_1_brush.html#a3b228cb4c9e5e7bf60904ab74e2fc6df">mPaintedAnything</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_brush.html#a0d333fbd43343ebb6d2cafa60d7220f0">  108</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classpepr3d_1_1_brush.html#a0d333fbd43343ebb6d2cafa60d7220f0">mPaintsSinceDraw</a> = 0;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">int</span> MAX_PAINTS_WITHOUT_DRAW = 1;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;};</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;}  <span class="comment">// namespace pepr3d</span></div><div class="ttc" id="structpepr3d_1_1_brush_settings_html_abe64fa6555c4a22a17cdf58779b0288e"><div class="ttname"><a href="structpepr3d_1_1_brush_settings.html#abe64fa6555c4a22a17cdf58779b0288e">pepr3d::BrushSettings::paintOuterRing</a></div><div class="ttdeci">bool paintOuterRing</div><div class="ttdoc">When respecting original triangles should we paint triangles that are not fully inside the brush?</div><div class="ttdef"><b>Definition:</b> Brush.h:35</div></div>
<div class="ttc" id="namespacepepr3d_html"><div class="ttname"><a href="namespacepepr3d.html">pepr3d</a></div><div class="ttdoc">Fix for CGAL bugs in polygon with holes verification Contained in CGAL PR #3688, likely to be in 4....</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:9</div></div>
<div class="ttc" id="classpepr3d_1_1_brush_html_a0d333fbd43343ebb6d2cafa60d7220f0"><div class="ttname"><a href="classpepr3d_1_1_brush.html#a0d333fbd43343ebb6d2cafa60d7220f0">pepr3d::Brush::mPaintsSinceDraw</a></div><div class="ttdeci">int mPaintsSinceDraw</div><div class="ttdoc">How many times can we run this tool without updating the screen.</div><div class="ttdef"><b>Definition:</b> Brush.h:108</div></div>
<div class="ttc" id="structpepr3d_1_1_brush_settings_html_a01300f710ecd757b8f532a1da1f3bc4c"><div class="ttname"><a href="structpepr3d_1_1_brush_settings.html#a01300f710ecd757b8f532a1da1f3bc4c">pepr3d::BrushSettings::size</a></div><div class="ttdeci">float size</div><div class="ttdoc">Size of a brush in model space units.</div><div class="ttdef"><b>Definition:</b> Brush.h:15</div></div>
<div class="ttc" id="classpepr3d_1_1_brush_html_aabba5037acc73348535a471b1e8a4979"><div class="ttname"><a href="classpepr3d_1_1_brush.html#aabba5037acc73348535a471b1e8a4979">pepr3d::Brush::getHotkey</a></div><div class="ttdeci">virtual std::optional&lt; Hotkey &gt; getHotkey(const Hotkeys &amp;hotkeys) const override</div><div class="ttdoc">Returns an associated Hotkey or an empty value. Use hotkeys.findHotkey() method.</div><div class="ttdef"><b>Definition:</b> Brush.h:59</div></div>
<div class="ttc" id="classpepr3d_1_1_brush_html_a6c6e2fb6715017a34ac7269b871cbf6d"><div class="ttname"><a href="classpepr3d_1_1_brush.html#a6c6e2fb6715017a34ac7269b871cbf6d">pepr3d::Brush::onToolDeselect</a></div><div class="ttdeci">virtual void onToolDeselect(ModelView &amp;modelView) override</div><div class="ttdoc">Called on a Tool right after user selects another tool. Note: It may also be called when a user selec...</div><div class="ttdef"><b>Definition:</b> Brush.cpp:41</div></div>
<div class="ttc" id="structpepr3d_1_1_brush_settings_html_ab509aa6a59f8a36b9de2ae9d579a47f7"><div class="ttname"><a href="structpepr3d_1_1_brush_settings.html#ab509aa6a59f8a36b9de2ae9d579a47f7">pepr3d::BrushSettings::paintBackfaces</a></div><div class="ttdeci">bool paintBackfaces</div><div class="ttdoc">Paint onto backward facing triangles.</div><div class="ttdef"><b>Definition:</b> Brush.h:21</div></div>
<div class="ttc" id="classpepr3d_1_1_brush_html_abfe0a46814dcd751d3801a8dfacd07cb"><div class="ttname"><a href="classpepr3d_1_1_brush.html#abfe0a46814dcd751d3801a8dfacd07cb">pepr3d::Brush::onModelViewMouseDrag</a></div><div class="ttdeci">virtual void onModelViewMouseDrag(ModelView &amp;modelView, ci::app::MouseEvent event) override</div><div class="ttdoc">Called on a currently active Tool when users drags a mouse button over a ModelView.</div><div class="ttdef"><b>Definition:</b> Brush.cpp:22</div></div>
<div class="ttc" id="classpepr3d_1_1_brush_html_acf2324919135ff372d21bd85e686da8c"><div class="ttname"><a href="classpepr3d_1_1_brush.html#acf2324919135ff372d21bd85e686da8c">pepr3d::Brush::updateRay</a></div><div class="ttdeci">void updateRay(ModelView &amp;modelView, ci::app::MouseEvent event)</div><div class="ttdoc">Update ray and intersection data.</div><div class="ttdef"><b>Definition:</b> Brush.cpp:74</div></div>
<div class="ttc" id="classpepr3d_1_1_brush_html_a73a878df80b0e06bccd02015e170f770"><div class="ttname"><a href="classpepr3d_1_1_brush.html#a73a878df80b0e06bccd02015e170f770">pepr3d::Brush::onNewGeometryLoaded</a></div><div class="ttdeci">virtual void onNewGeometryLoaded(ModelView &amp;modelView)</div><div class="ttdoc">Called on EVERY Tool right after a new Geometry is loaded or imported.</div><div class="ttdef"><b>Definition:</b> Brush.cpp:159</div></div>
<div class="ttc" id="structpepr3d_1_1_brush_settings_html_adddaabb9e5cd0271e781423eb77765db"><div class="ttname"><a href="structpepr3d_1_1_brush_settings.html#adddaabb9e5cd0271e781423eb77765db">pepr3d::BrushSettings::respectOriginalTriangles</a></div><div class="ttdeci">bool respectOriginalTriangles</div><div class="ttdoc">Will not create new triangles to match brush shape.</div><div class="ttdef"><b>Definition:</b> Brush.h:32</div></div>
<div class="ttc" id="classpepr3d_1_1_brush_html_a88cb183b963bd9e4e5082fcbe50bdcd1"><div class="ttname"><a href="classpepr3d_1_1_brush.html#a88cb183b963bd9e4e5082fcbe50bdcd1">pepr3d::Brush::drawToModelView</a></div><div class="ttdeci">virtual void drawToModelView(ModelView &amp;modelView) override</div><div class="ttdoc">Called every frame on a currently active Tool. Draw to ModelView from inside this method.</div><div class="ttdef"><b>Definition:</b> Brush.cpp:148</div></div>
<div class="ttc" id="classpepr3d_1_1_tool_html"><div class="ttname"><a href="classpepr3d_1_1_tool.html">pepr3d::Tool</a></div><div class="ttdoc">A base class of all tools that the user can select and manipulate the Geometry and application with t...</div><div class="ttdef"><b>Definition:</b> Tool.h:18</div></div>
<div class="ttc" id="classpepr3d_1_1_brush_html_a9222fa4ba78b38f7b37767dfe8d26b67"><div class="ttname"><a href="classpepr3d_1_1_brush.html#a9222fa4ba78b38f7b37767dfe8d26b67">pepr3d::Brush::onModelViewMouseDown</a></div><div class="ttdeci">virtual void onModelViewMouseDown(ModelView &amp;modelView, ci::app::MouseEvent event) override</div><div class="ttdoc">Called on a currently active Tool when users presses a mouse button over a ModelView.</div><div class="ttdef"><b>Definition:</b> Brush.cpp:7</div></div>
<div class="ttc" id="classpepr3d_1_1_brush_html_a3b228cb4c9e5e7bf60904ab74e2fc6df"><div class="ttname"><a href="classpepr3d_1_1_brush.html#a3b228cb4c9e5e7bf60904ab74e2fc6df">pepr3d::Brush::mPaintedAnything</a></div><div class="ttdeci">bool mPaintedAnything</div><div class="ttdoc">Did we paint anything since selecting this tool.</div><div class="ttdef"><b>Definition:</b> Brush.h:105</div></div>
<div class="ttc" id="classpepr3d_1_1_brush_html_a0f0e98b2326e88fa5b6a3cbeaeb9b3b1"><div class="ttname"><a href="classpepr3d_1_1_brush.html#a0f0e98b2326e88fa5b6a3cbeaeb9b3b1">pepr3d::Brush::drawToSidePane</a></div><div class="ttdeci">virtual void drawToSidePane(SidePane &amp;sidePane) override</div><div class="ttdoc">Called every frame on a currently active Tool. Draw to SidePane from inside this method.</div><div class="ttdef"><b>Definition:</b> Brush.cpp:83</div></div>
<div class="ttc" id="classpepr3d_1_1_hotkeys_html"><div class="ttname"><a href="classpepr3d_1_1_hotkeys.html">pepr3d::Hotkeys</a></div><div class="ttdoc">All hotkeys and their corresponding actions.</div><div class="ttdef"><b>Definition:</b> Hotkeys.h:176</div></div>
<div class="ttc" id="classpepr3d_1_1_brush_html_a8a5bfb009a6c666bf0cfdd6afe55812a"><div class="ttname"><a href="classpepr3d_1_1_brush.html#a8a5bfb009a6c666bf0cfdd6afe55812a">pepr3d::Brush::getName</a></div><div class="ttdeci">virtual std::string getName() const override</div><div class="ttdoc">Returns a short name, displayed e.g., in a side pane and tooltip.</div><div class="ttdef"><b>Definition:</b> Brush.h:55</div></div>
<div class="ttc" id="structpepr3d_1_1_brush_settings_html_a297b93063de058754d95730263c48a59"><div class="ttname"><a href="structpepr3d_1_1_brush_settings.html#a297b93063de058754d95730263c48a59">pepr3d::BrushSettings::segments</a></div><div class="ttdeci">int segments</div><div class="ttdoc">Number of segments of the brush.</div><div class="ttdef"><b>Definition:</b> Brush.h:18</div></div>
<div class="ttc" id="structpepr3d_1_1_brush_settings_html_a4949a6501a1ac9525c0b8ef4219bfdec"><div class="ttname"><a href="structpepr3d_1_1_brush_settings.html#a4949a6501a1ac9525c0b8ef4219bfdec">pepr3d::BrushSettings::alignToNormal</a></div><div class="ttdeci">bool alignToNormal</div><div class="ttdoc">Use local normal for direction of shape brush.</div><div class="ttdef"><b>Definition:</b> Brush.h:40</div></div>
<div class="ttc" id="classpepr3d_1_1_hotkeys_html_af57c6eb43b445e2f94f5777c216186d7"><div class="ttname"><a href="classpepr3d_1_1_hotkeys.html#af57c6eb43b445e2f94f5777c216186d7">pepr3d::Hotkeys::findHotkey</a></div><div class="ttdeci">std::optional&lt; Hotkey &gt; findHotkey(HotkeyAction action) const</div><div class="ttdoc">Returns a hotkey for a certain action.</div><div class="ttdef"><b>Definition:</b> Hotkeys.h:184</div></div>
<div class="ttc" id="classpepr3d_1_1_model_view_html"><div class="ttname"><a href="classpepr3d_1_1_model_view.html">pepr3d::ModelView</a></div><div class="ttdoc">The main part of the user interface, shows the geometry to the user.</div><div class="ttdef"><b>Definition:</b> ModelView.h:19</div></div>
<div class="ttc" id="structpepr3d_1_1_brush_settings_html"><div class="ttname"><a href="structpepr3d_1_1_brush_settings.html">pepr3d::BrushSettings</a></div><div class="ttdoc">Current settings of the Brush tool.</div><div class="ttdef"><b>Definition:</b> Brush.h:10</div></div>
<div class="ttc" id="structpepr3d_1_1_brush_settings_html_a6988634902d2ebb5e10e4ed2ed9e74dc"><div class="ttname"><a href="structpepr3d_1_1_brush_settings.html#a6988634902d2ebb5e10e4ed2ed9e74dc">pepr3d::BrushSettings::spherical</a></div><div class="ttdeci">bool spherical</div><div class="ttdoc">Use spherical brush (otherwise shape brush will be used.</div><div class="ttdef"><b>Definition:</b> Brush.h:24</div></div>
<div class="ttc" id="classpepr3d_1_1_brush_html_af329ad67cb6de39d79e50b6ad61d5de6"><div class="ttname"><a href="classpepr3d_1_1_brush.html#af329ad67cb6de39d79e50b6ad61d5de6">pepr3d::Brush::stopPaint</a></div><div class="ttdeci">void stopPaint()</div><div class="ttdoc">Stop painting.</div><div class="ttdef"><b>Definition:</b> Brush.cpp:63</div></div>
<div class="ttc" id="classpepr3d_1_1_brush_html_acf9efe6c3b3b8bed2ed8b06c68f5f0f9"><div class="ttname"><a href="classpepr3d_1_1_brush.html#acf9efe6c3b3b8bed2ed8b06c68f5f0f9">pepr3d::Brush::onModelViewMouseUp</a></div><div class="ttdeci">virtual void onModelViewMouseUp(ModelView &amp;modelView, ci::app::MouseEvent event) override</div><div class="ttdoc">Called on a currently active Tool when users releases a mouse button over a ModelView.</div><div class="ttdef"><b>Definition:</b> Brush.cpp:15</div></div>
<div class="ttc" id="classpepr3d_1_1_brush_html_a158f2295d13bb0a11f28b88f24dd4cfd"><div class="ttname"><a href="classpepr3d_1_1_brush.html#a158f2295d13bb0a11f28b88f24dd4cfd">pepr3d::Brush::isEnabled</a></div><div class="ttdeci">virtual bool isEnabled() const override</div><div class="ttdoc">Returns true if enabled and can be selected, otherwise false. This should be a fast method,...</div><div class="ttdef"><b>Definition:</b> Brush.cpp:79</div></div>
<div class="ttc" id="classpepr3d_1_1_brush_html"><div class="ttname"><a href="classpepr3d_1_1_brush.html">pepr3d::Brush</a></div><div class="ttdoc">Tool used for painting a model while not being limited by the original triangles.</div><div class="ttdef"><b>Definition:</b> Brush.h:51</div></div>
<div class="ttc" id="classpepr3d_1_1_brush_html_af5e005149a8d975bcdeebc3432388572"><div class="ttname"><a href="classpepr3d_1_1_brush.html#af5e005149a8d975bcdeebc3432388572">pepr3d::Brush::paint</a></div><div class="ttdeci">void paint()</div><div class="ttdoc">Do painting tick on the model.</div><div class="ttdef"><b>Definition:</b> Brush.cpp:45</div></div>
<div class="ttc" id="classpepr3d_1_1_main_application_html"><div class="ttname"><a href="classpepr3d_1_1_main_application.html">pepr3d::MainApplication</a></div><div class="ttdoc">The main Cinder-based application, represents a window, handles events, thread pool,...</div><div class="ttdef"><b>Definition:</b> MainApplication.h:38</div></div>
<div class="ttc" id="classpepr3d_1_1_brush_html_a19ed1135e2c4cc603f001c6af4b2f58f"><div class="ttname"><a href="classpepr3d_1_1_brush.html#a19ed1135e2c4cc603f001c6af4b2f58f">pepr3d::Brush::getIcon</a></div><div class="ttdeci">virtual std::string getIcon() const override</div><div class="ttdoc">Returns a UTF-8 icon from an icon font.</div><div class="ttdef"><b>Definition:</b> Brush.h:63</div></div>
<div class="ttc" id="classpepr3d_1_1_side_pane_html"><div class="ttname"><a href="classpepr3d_1_1_side_pane.html">pepr3d::SidePane</a></div><div class="ttdoc">Right side of the user interface that displays options of the currently selected tool.</div><div class="ttdef"><b>Definition:</b> SidePane.h:13</div></div>
<div class="ttc" id="structpepr3d_1_1_brush_settings_html_a926d73e6b64dda9d777ba090074bd031"><div class="ttname"><a href="structpepr3d_1_1_brush_settings.html#a926d73e6b64dda9d777ba090074bd031">pepr3d::BrushSettings::color</a></div><div class="ttdeci">size_t color</div><div class="ttdoc">Index of the selected color.</div><div class="ttdef"><b>Definition:</b> Brush.h:12</div></div>
<div class="ttc" id="classpepr3d_1_1_brush_html_ae73bad242cb367db774983ba3bd9022f"><div class="ttname"><a href="classpepr3d_1_1_brush.html#ae73bad242cb367db774983ba3bd9022f">pepr3d::Brush::onToolSelect</a></div><div class="ttdeci">virtual void onToolSelect(ModelView &amp;modelView) override</div><div class="ttdoc">Called on a Tool right after user selects it. Note: It may also be called when a user selects the sam...</div><div class="ttdef"><b>Definition:</b> Brush.cpp:37</div></div>
<div class="ttc" id="structpepr3d_1_1_brush_settings_html_a45ac5bb04d5a502b31811ecd94d6fe2b"><div class="ttname"><a href="structpepr3d_1_1_brush_settings.html#a45ac5bb04d5a502b31811ecd94d6fe2b">pepr3d::BrushSettings::continuous</a></div><div class="ttdeci">bool continuous</div><div class="ttdoc">Paint only to triangles connected to the origin.</div><div class="ttdef"><b>Definition:</b> Brush.h:29</div></div>
<div class="ttc" id="classpepr3d_1_1_brush_html_a5708ed96781b524410ac440ead73507f"><div class="ttname"><a href="classpepr3d_1_1_brush.html#a5708ed96781b524410ac440ead73507f">pepr3d::Brush::onModelViewMouseMove</a></div><div class="ttdeci">virtual void onModelViewMouseMove(ModelView &amp;modelView, ci::app::MouseEvent event) override</div><div class="ttdoc">Called on a currently active Tool when users moves mouse cursor over a ModelView. Note: This method i...</div><div class="ttdef"><b>Definition:</b> Brush.cpp:31</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_1563a38af0d3a5e4a6330d6d45e9792a.html">tools</a></li><li class="navelem"><b>Brush.h</b></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
